#ifndef SQLCONN_H
#define SQLCONN_H

#include <QObject>
#include <QSqlDatabase>
#include "doctor.h"
#include "guest.h"
#include "pet.h"

class SQLConn : public QObject
{
    Q_OBJECT
public:
    explicit SQLConn(QObject *parent = nullptr);
    void init();
    QList<Doctor> getDocInfos();
    QList<Guest> getGueInfos();
    QList<Pet> getPetInfos();
    QString getOwnerPhone(int);
    QString getOwnerName(int);
    void delete_doctor(int);
    void update_doctor(int, int, QString);
    void add_doctor(QString, int, QString, float, QString, int, int, QString);
    void delete_guest(int);
    void update_guest(int, int, QString);
    void add_guest(QString, QString, int, QString, QString);
    void delete_pet(int);
    void update_pet(int, int, QString);
    void add_pet(QString, QString, float, QString, int, QString, QString);

private:
    QSqlDatabase db;
    QStringList docSQL;
    QStringList gueSQL;
    QStringList petSQL;


signals:
    void sql_operator_success();

public slots:
};

#endif // SQLCONN_H
